package com.itheima.jz;

public class Demo4swap {
    public static void main(String[] args) {
        int[] arr = {11,22,33,66,44,55};
        //注意for的格式
        for (int i = 0,j = arr.length-1; i <j ; i++,j--) {
            int temp = arr[i];
            arr[i] = arr[j];
            arr[j] = temp;
        }
        for (int i = 0; i < arr.length; i++) {
            System.out.println(arr[i]);
        }
    }
}
